package com.app.couponsharelife.ui.dialog

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.WindowManager
import com.app.couponsharelife.R
import com.app.couponsharelife.ui.listener.OnClickListener
import kotlinx.android.synthetic.main.dialog_refund_success.*

/**
 *Created by xct on 2019/3/12
 *Description:
 */
class RefundSuccessDialog(context: Context, themeResId: Int, private val listener: OnClickListener): Dialog(context,themeResId)  {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.dialog_refund_success)
        initView()
    }
    private fun initView(){
        refundSuccess_tvBut.setOnClickListener {
            listener.click(0,"")
        }
        window!!.setWindowAnimations(R.style.scale_in_alpha_out)
        setCanceledOnTouchOutside(false)
        setCancelable(false)
        val lp = window!!.attributes
        lp.width = WindowManager.LayoutParams.MATCH_PARENT
        lp.height = WindowManager.LayoutParams.WRAP_CONTENT
        window!!.attributes = lp
    }
}